package se.liu.johfa428.game.objects.intro;

import java.awt.Color;

import se.liu.oschi129.font.fontspace.FontSpace;
import se.liu.oschi129.world.interfaces.InputAction;
import se.liu.oschi129.world.model.World;
import se.liu.oschi129.world.model.WorldInput;
import se.liu.oschi129.world.model.WorldGraphics;
import se.liu.oschi129.world.objects.WorldStaticObject;

public class ObjectEndOfGame extends WorldStaticObject implements InputAction{

	private World world;

	public ObjectEndOfGame(World world) {
		super(0, 0, 320, 240);
		setVisible(true);
		this.world = world;
	}

	public void performInputAction(WorldInput input) {
		if (input.jumpDown()) {
			world.clearSynchronized();
			world.popSynchronized();
		}
	}

	@Override public void performDrawingAction(WorldGraphics worldg){

		worldg.setColor(Color.WHITE);

		worldg.setFont(FontSpace.get("font_status",12f));

		worldg.drawText(50, 50, "Last word");
	}
}
